%ul.nav-links.issues-state-filters
  - if defined?(type) && type == :merge_requests
    - page_context_word = '合并请求'
  - else
    - page_context_word = '问题'
  %li{class: ("active" if params[:state] == 'opened')}
    = link_to page_filter_path(state: 'opened', label: true), title: "只显示当前未关闭的#{page_context_word}。" do
      #{state_filters_text_for(:opened, @project)}

  - if defined?(type) && type == :merge_requests
    %li{class: ("active" if params[:state] == 'merged')}
      = link_to page_filter_path(state: 'merged', label: true), title: '只显示当前已合并的合并请求。' do
        #{state_filters_text_for(:merged, @project)}

    %li{class: ("active" if params[:state] == 'closed')}
      = link_to page_filter_path(state: 'closed', label: true), title: '只显示当前已关闭、未合并的合并请求。' do
        #{state_filters_text_for(:closed, @project)}
  - else
    %li{class: ("active" if params[:state] == 'closed')}
      = link_to page_filter_path(state: 'closed', label: true), title: '只显示当前已关闭的问题。' do
        #{state_filters_text_for(:closed, @project)}

  %li{class: ("active" if params[:state] == 'all')}
    = link_to page_filter_path(state: 'all', label: true), title: "显示全部#{page_context_word}。" do
      #{state_filters_text_for(:all, @project)}
